package com.boco.raptor.subsystem.attempx.dto;


import java.util.*;

import com.boco.transnms.common.dto.base.*;

public class ServerWsList extends GenericDO{
    public static final String CLASS_NAME = "SERVER_WS_LIST";
    private static Map<String, Class> attrTypeMap = new HashMap();

    public static class AttrName{
        public static final String serverSupplier = "SERVER_SUPPLIER";
        public static final String openType = "OPEN_TYPE";
        public static final String wsUrl = "WS_URL";
        public static final String wsFunction = "WS_FUNCTION";
    }

    static{
        attrTypeMap.put(AttrName.serverSupplier, String.class);
        attrTypeMap.put(AttrName.openType, String.class);
        attrTypeMap.put(AttrName.wsUrl, String.class);
        attrTypeMap.put(AttrName.wsFunction, String.class);
    }

    public ServerWsList() {
        super(CLASS_NAME);
    }

    public String[] getAllAttrNames() {
        String[] attrNames = new String[attrTypeMap.size()];
        attrTypeMap.keySet().toArray(attrNames);
        return attrNames;
    }

    public Class getAttrType(String attrName) {
        return attrTypeMap.get(attrName);
    }

    public void setServerSupplier(String serverSupplier) {
        super.setAttrValue(AttrName.serverSupplier, serverSupplier);
    }

    public void setOpenType(String openType) {
        super.setAttrValue(AttrName.openType, openType);
    }

    public void setWsUrl(String wsUrl) {
        super.setAttrValue(AttrName.wsUrl, wsUrl);
    }

    public void setWsFunction(String wsFunction) {
        super.setAttrValue(AttrName.wsFunction, wsFunction);
    }


    public String getServerSupplier() {
        return super.getAttrString(AttrName.serverSupplier);
    }

    public String getOpenType() {
        return super.getAttrString(AttrName.openType);
    }

    public String getWsUrl() {
        return super.getAttrString(AttrName.wsUrl);
    }

    public String getWsFunction() {
        return super.getAttrString(AttrName.wsFunction);
    }
}
